using System.ComponentModel;

namespace WebApi
{
    public class WeatherForecast
    {
        public DateOnly Date { get; set; }

        /// <summary>
        /// 使用 attribute 设置默认值，会同时在Swagger中生效
        /// </summary>
        [DefaultValue(-10)]
        public int TemperatureC { get; set; }

        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

        public string? Summary { get; set; }
    }
}